home *** CD-ROM | disk | FTP | other *** search
-
-
-
- CCCCLLLLIIIIPPPP((((1111)))) GGGGeeeeoooommmmeeeettttrrrryyyy CCCCeeeennnntttteeeerrrr ((((22223333 NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999999994444)))) CCCCLLLLIIIIPPPP((((1111))))
-
-
-
- NNNNAAAAMMMMEEEE
- clip - Clip an OOGL object against planes or other surfaces
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- cccclllliiiipppp [----vvvv _a_x_i_s_x,_y,_z,...]
- [----gggg _v_a_l_u_e-_o_r-_p_o_i_n_t] [----llll _v_a_l_u_e-_o_r-_p_o_i_n_t]
- [----ssss _n_s_t_r_i_p_s[,_f_r_a_c_t_i_o_n]] [----eeee]
- [----sssspppphhhh _c_e_n_t_e_r_x,_y,_z,...] [----ccccyyyyllll _c_e_n_t_e_r_x,_y,_z,...]
- [_o_o_g_l_f_i_l_e]
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- CCCClllliiiipppp, adapted from Daeron Meyer's ggggiiiinnnnssssuuuu module, allows
- clipping an OOGL object against planes, spheres, or
- cylinders from the UNIX command line. Its input can come
- from a file or standard input; output is written to standard
- output.
-
- Options specify a function of space position; the output is
- the portion of the object where the function is greater or
- less than some given value, or the portion lying between two
- values. Alternatively, an object can be sliced into
- equally-spaced strips. Objects may be of any dimension (but
- see the BUGS section).
-
- Options are:
-
- ----gggg _v_a_l_u_e-_o_r-_p_o_i_n_t
-
- ----llll _v_a_l_u_e-_o_r-_p_o_i_n_t
- Select the portion of the object where the function is
- greater than (----gggg) or less than (----llll) the given value.
- If both are specified, the result is the portion of the
- object satisfying both conditions.
-
- If, rather than a single number, the argument to ----llll or
- ----gggg is a point (a series of x,y,z,... values separated
- by commas, with no embedded blanks), then the clipping
- surface is one chosen to pass through that point.
-
- ----vvvv _a_x_i_s_x,_y,_z,...
- Specifies a direction in space. For planar clipping
- (the default), it's the plane normal direction; the
- clipping function is the inner product between the
- direction vector and the point on the object. For
- cylindrical clipping, ----vvvv specifies the direction of the
- cylinder's axis; the clipping function is the distance
- from the axis.
-
- ----sssspppphhhh _c_e_n_t_e_r_x,_y,_z,...
- Clip against spheres centered on _x,_y,_z,.... The
- clipping function is the distance from the given
- center. Coordinates must be separated by commas
-
-
-
- Page 1 (printed 12/22/98)
-
-
-
-
-
-
- CCCCLLLLIIIIPPPP((((1111)))) GGGGeeeeoooommmmeeeettttrrrryyyy CCCCeeeennnntttteeeerrrr ((((22223333 NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999999994444)))) CCCCLLLLIIIIPPPP((((1111))))
-
-
-
- without intervening spaces.
-
- ----ccccyyyyllll _c_e_n_t_e_r_x,_y,_z,...
- Clip against cylinders with an axis passing through
- _c_e_n_t_e_r_x,_y,_z,..., with axis direction given by the ----vvvv
- option. The clipping function is the distance from the
- axis.
-
- ----ssss _n_s_l_i_c_e_s[,_f_r_a_c_t_i_o_n]
- Clip an object into a series of _n_s_l_i_c_e_s ribbons
- spanning its entire extent -- the range of function-
- values over the object. Part of each ribbon is
- omitted; the _f_r_a_c_t_i_o_n, default .5, sets the width of
- the visible part of a ribbon compared to the ribbon
- period. There are a total of (_n_s_l_i_c_e_s+_f_r_a_c_t_i_o_n-1)
- ribbon periods across the object, so e.g. ----ssss 2222,,,,....5555
- slices the object into equal thirds, omitting the
- middle third. The output OOGL object is a LIST of
- OFFs, one per ribbon.
-
- ----eeee Don't emit a clipped OOGL object, just print two
- numbers, listing the minimum and maximum function
- values for the object. If ----gggg or ----llll clipping options
- are specified, the object is clipped before determining
- the function range. If none of the object remains,
- cccclllliiiipppp prints "0 0".
-
- EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
- To extract the portion of an object lying below the x+y+z=1
- plane:
-
- clip -l 1 -v 1,1,1 file.oogl > portion.oogl
-
- To extract the portion of an object lying in the positive
- octant and below the x+y+z=1 plane, we can pipe multiple
- instances of cccclllliiiipppp together to find the intersection of
- several half-spaces:
-
- clip -g 0 -v 1,0,0 file.oogl | \
- clip -g 0 -v 0,1,0 | \
- clip -g 0 -v 0,0,1 | \
- clip -l 1 -v 1,1,1 > portion.oogl
-
- To find the region lying between two surfaces (either above
- one and below the other, or below the first and above the
- second), say the planes 2x + y -.5z = 1 and y + 2z = 0:
-
- echo "{ LIST"
- clip -v 2,1,-.5 -g 1 file.oogl | clip -v 0,1,2 -l 0
- clip -v 2,1,-.5 -l 1 file.oogl | clip -v 0,1,2 -g 0
- echo "}"
-
-
-
-
- Page 2 (printed 12/22/98)
-
-
-
-
-
-
- CCCCLLLLIIIIPPPP((((1111)))) GGGGeeeeoooommmmeeeettttrrrryyyy CCCCeeeennnntttteeeerrrr ((((22223333 NNNNoooovvvveeeemmmmbbbbeeeerrrr 1111999999994444)))) CCCCLLLLIIIIPPPP((((1111))))
-
-
-
- We use pipelines to compute intersections, and a LIST to
- form their union.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- ginsu(1)
-
- BBBBUUUUGGGGSSSS
- Uses anytooff(1) to convert input data to OFF format
- internally; this can lose information. The only arbitrary-
- dimensional form accepted at present is nOFF, not nSKEL or
- nMESH. However the four-dimensional 4OFF, 4QUAD, 4MESH,
- 4VECT, etc. formats should work.
-
- CCCClllliiiipppp really only clips edges. If a curved clipping surface
- cuts an edge twice, or removes only an interior portion of
- some polygon, cccclllliiiipppp misses it entirely. Clipping against a
- curved surface yields a straight edge (a chord of the ideal
- curved edge segment). This latter failing might be fixed
- someday.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 3 (printed 12/22/98)
-
-
-
-